package com.mce.nebula.entity;

import com.mce.nebula.common.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 团队成员实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "tenant_perms", 
       uniqueConstraints = @UniqueConstraint(columnNames = {"tenant_id", "user_id"}))
public class TeamUser extends BaseEntity {
    
    @Column(name = "tenant_id", length = 32, nullable = false)
    private String tenantId;
    
    @Column(name = "user_id", nullable = false)
    private Integer userId;
    
    @Column(name = "identity", length = 15, nullable = false)
    private String identity; // owner, admin, developer, viewer, access
    
    @Column(name = "is_active", nullable = false)
    private Boolean isActive = true;
    
    @Column(name = "enterprise_id", length = 32)
    private String enterpriseId;
}





